'
Jenna has been working on creating a DVD library where she can list all of the DVDs that she has. Some she bought herself, others were gifts from her mom, dad, sister, grandpa, and grandma. The root element for her library is dvdlibrary with one or more dvd elements. Each dvd has a title, description, year, company, favorite characters, favorite bonus features, and purchase information. Her characters elements each have one or more character elements. Her bonus elements each have one or more features. Her purchased elements each have price, location, and date. The dvd element has two attributes, bonus element has one attribute, and the purchased element has no attributes.
Jenna wishes to create an XSLT style sheet to use to display the DVD collection information attractively. She has already created a CSS style sheet for the page. Complete the following:
<head>
<title>Jenna\'s DVD Collection</title>
<link href="dvdlibrarystyles.css"
rel="stylesheet" type="text/css" />
</head>
<body>
<header>
<h1>Jenna\'s DVD Collection</h1>
</header>
</body>
</html>
Generate a result document using either an XML editor or your Web browser. Verify that the layout and content of each item matches that shown in the figure below:
------------------------dvdlibrarystyles.css file-----------------------------------------
/*
New Perspectives on XML, 3rd Edition
Tutorial 5
Tutorial Project
DVD Library Style Sheet
Filename: libstyles.css
Supporting Files: none
*/
/* Default styles */
* {
margin: 0px;
list-style: none;
}
header, section, article {
display: block;
}
/* Body styles */
body {
background-color: white;
font-family: Verdana, Geneva, sans-serif;
margin: 10px auto;
width: 920px;
}
header h1 {
color: white;
font-size: 2.8em;
font-weight: normal;
text-shadow: rgb(90, 127, 0) 0px 0px 25px;
}
header h2 {
font-size: 1.5em;
font-weight: normal;
color: rgb(90, 127, 0);
}
section {
margin-top: 25px;
}
section > h1 {
font-weight: normal;
font-size: 1.9em;
}
article {
border: 1px solid black;
margin: 10px 10px;
padding: 10px;
width: 400px;
float: left;
box-shadow: rgb(151, 151, 151) 8px 8px 15px;
}
article > h1, article > h2 {
background-color: rgb(190, 235, 110);
}
article > h1 {
font-size: 1em;
font-weight: normal;
padding: 10px 0px 0px 10px;
}
article > h2 {
font-size: 0.7em;
font-weight: normal;
padding: 0px 0px 10px 10px;
border-bottom: 1px solid black;
}
article > p {
font-size: 0.7em;
margin: 4px 0px 0px 0px;
}
article span {
color: rgb(151,151, 151);
}
table {
border-collapse: collapse;
margin: 10px 0px 5px 0px;
}
td, th {
border: 1px solid rgb(191, 191, 191);
font-weight: normal;
font-size: 0.7em;
padding: 3px;
text-align: center;
}
th {
background-color: rgb(231, 231, 231);
}
------------------------------dvdlibrary.txt file------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dvdlibrary>
<dvd isbn="1-4157-4399-0" from="mom">
<title>Kung Fu Lizard</title>
<description>Jo defends his training academy against the evil Mighty Moose, Benny.</description>
<year>2011</year>
<company>Cloud Nine Productions</company>
<characters>
<character>Jo, the Kung Fu Lizard</character>
<character>Lisa, the Fighting Kricket</character>
<character>Benny, the Evil Mangler Moose</character>
</characters>
<bonus num="2">
<feature>Kung Fu Academy</feature>
<feature>Cast Commentary</feature>
</bonus>
<purchased>
<price>19.94</price>
<location>Best DVDs in Town</location>
<date>2012-10-03</date>
</purchased>
</dvd>
<dvd isbn="1-5158-4399-0" from="mom">
<title>Planet of the Ogres</title>
<description>Bilbo had always dreamt he was from another planet. Now he finds out that he is. Join him as he meets his destiny to save his homeworld.</description>
<year>2012</year>
<company>MGM</company>
<characters>
<character>Bilbo, future leader of the Ogres</character>
<character>Kilnary, leader of the invading Tigres</character>
<character>Wicket, leader of the Morkian army</character>
</characters>
<bonus num="3">
<feature>Making Of Featurette</feature>
<feature>Theatre Trailers</feature>
<feature>PC downloadable version</feature>
</bonus>
<purchased>
<price>17.99</price>
<location>Mallmart</location>
<date>2013-10-06</date>
</purchased>
</dvd>
<dvd isbn="1-9955-8745-0" from="mom">
<title>Mountain King</title>
<description>Freda is the daughter of the Mountain King. As the only heir, will she break with tradition and be the first Mountain Queen?</description>
<year>2014</year>
<company>Sunny Entertainment</company>
<characters>
<character>Freda, daughter of the Mountain King</character>
<character>Toru, the Mountain King</character>
<character>Ella, the Enchanted Advisor</character>
<character>Bopo, the Monkey Bone Wizard</character>
</characters>
<bonus num="2">
<feature>Cast Commentary</feature>
<feature>Mountain King Music Video</feature>
</bonus>
<purchased>
<price>14.99</price>
<location>Movies For Everyone</location>
<date>2015-11-07</date>
</purchased>
</dvd>
</dvdlibrary>